#include "TestResultTable.h"
#include <sstream>
using namespace std;

TestResultTable::TestResultTable(vector<int> query_var_indexes){
	this->query_var_idxes_ = query_var_indexes;
	vector<vector<int>*> new_data;
	this->table_data_ = &new_data;
}

void TestResultTable::AddTestResultTuple(vector<int>& tuple){
	vector<int> new_tuple = tuple;
	vector<int>* p_tuple = &new_tuple;
	this->table_data_->push_back(p_tuple);
}

string TestResultTable::ToString(){
	stringstream ss;
	for(int i = 0; i < this->table_data_->size(); i++){
		for(int j = 0; j < this->table_data_->at(i)->size(); j++){
			ss << table_data_->at(i)->at(j) << " ";
		}
		ss << endl;
	}
	return ss.str();
}